Optimal. Leaf size=155 \[ \frac {b \left (b d+2 c \sqrt {\frac {d}{x}}\right ) \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}{4 c^2}-\frac {2 \left (a+b \sqrt {\frac {d}{x}}+\frac {c}{x}\right )^{3/2}}{3 c}+\frac {b \sqrt {d} \left (4 a c-b^2 d\right ) \tanh ^{-1}\left (\frac {b d+2 c \sqrt {\frac {d}{x}}}{2 \sqrt {c} \sqrt {d} \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}\right )}{8 c^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {1994, 1355,
654, 626, 635, 212} \begin {gather*} \frac {b \sqrt {d} \left (4 a c-b^2 d\right ) \tanh ^{-1}\left (\frac {b d+2 c \sqrt {\frac {d}{x}}}{2 \sqrt {c} \sqrt {d} \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}\right )}{8 c^{5/2}}+\frac {b \left (b d+2 c \sqrt {\frac {d}{x}}\right ) \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}{4 c^2}-\frac {2 \left (a+b \sqrt {\frac {d}{x}}+\frac {c}{x}\right )^{3/2}}{3 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 626
Rule 635
Rule 654
Rule 1355
Rule 1994
Rubi steps
\begin {align*} \int \frac {\sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}{x^2} \, dx &=-\frac {\text {Subst}\left (\int \sqrt {a+b \sqrt {x}+\frac {c x}{d}} \, dx,x,\frac {d}{x}\right )}{d}\\ &=-\frac {2 \text {Subst}\left (\int x \sqrt {a+b x+\frac {c x^2}{d}} \, dx,x,\sqrt {\frac {d}{x}}\right )}{d}\\ &=-\frac {2 \left (a+b \sqrt {\frac {d}{x}}+\frac {c}{x}\right )^{3/2}}{3 c}+\frac {b \text {Subst}\left (\int \sqrt {a+b x+\frac {c x^2}{d}} \, dx,x,\sqrt {\frac {d}{x}}\right )}{c}\\ &=\frac {b \left (b d+2 c \sqrt {\frac {d}{x}}\right ) \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}{4 c^2}-\frac {2 \left (a+b \sqrt {\frac {d}{x}}+\frac {c}{x}\right )^{3/2}}{3 c}+\frac {\left (b \left (4 a c-b^2 d\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x+\frac {c x^2}{d}}} \, dx,x,\sqrt {\frac {d}{x}}\right )}{8 c^2}\\ &=\frac {b \left (b d+2 c \sqrt {\frac {d}{x}}\right ) \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}{4 c^2}-\frac {2 \left (a+b \sqrt {\frac {d}{x}}+\frac {c}{x}\right )^{3/2}}{3 c}+\frac {\left (b \left (4 a c-b^2 d\right )\right ) \text {Subst}\left (\int \frac {1}{\frac {4 c}{d}-x^2} \, dx,x,\frac {b+\frac {2 c \sqrt {\frac {d}{x}}}{d}}{\sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}\right )}{4 c^2}\\ &=\frac {b \left (b d+2 c \sqrt {\frac {d}{x}}\right ) \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}{4 c^2}-\frac {2 \left (a+b \sqrt {\frac {d}{x}}+\frac {c}{x}\right )^{3/2}}{3 c}+\frac {b \sqrt {d} \left (4 a c-b^2 d\right ) \tanh ^{-1}\left (\frac {\sqrt {d} \left (b+\frac {2 c \sqrt {\frac {d}{x}}}{d}\right )}{2 \sqrt {c} \sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}}}\right )}{8 c^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.64, size = 168, normalized size = 1.08 \begin {gather*} \frac {\sqrt {a+b \sqrt {\frac {d}{x}}+\frac {c}{x}} \left (-\frac {2 \sqrt {c} \left (8 c^2-3 b^2 d x+2 c \left (4 a+b \sqrt {\frac {d}{x}}\right ) x\right )}{x}+\frac {3 b d \left (-4 a c+b^2 d\right ) \log \left (c^2 \left (b d+2 c \sqrt {\frac {d}{x}}-2 \sqrt {c} \sqrt {\frac {d \left (c+a x+b \sqrt {\frac {d}{x}} x\right )}{x}}\right )\right )}{\sqrt {\frac {d \left (c+\left (a+b \sqrt {\frac {d}{x}}\right ) x\right )}{x}}}\right )}{24 c^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(330\) vs.
\(2(123)=246\).
time = 0.07, size = 331, normalized size = 2.14
method | result | size |
default | \(\frac {\sqrt {\frac {b \sqrt {\frac {d}{x}}\, x +a x +c}{x}}\, \left (-3 \sqrt {c}\, \ln \left (\frac {2 c +b \sqrt {\frac {d}{x}}\, x +2 \sqrt {c}\, \sqrt {b \sqrt {\frac {d}{x}}\, x +a x +c}}{\sqrt {x}}\right ) \left (\frac {d}{x}\right )^{\frac {3}{2}} x^{3} b^{3}+6 \sqrt {b \sqrt {\frac {d}{x}}\, x +a x +c}\, \left (\frac {d}{x}\right )^{\frac {3}{2}} x^{3} b^{3}+12 c^{\frac {3}{2}} a \ln \left (\frac {2 c +b \sqrt {\frac {d}{x}}\, x +2 \sqrt {c}\, \sqrt {b \sqrt {\frac {d}{x}}\, x +a x +c}}{\sqrt {x}}\right ) \sqrt {\frac {d}{x}}\, x^{2} b +6 a \sqrt {b \sqrt {\frac {d}{x}}\, x +a x +c}\, d \,x^{2} b^{2}-12 a \sqrt {b \sqrt {\frac {d}{x}}\, x +a x +c}\, \sqrt {\frac {d}{x}}\, x^{2} b c -6 \left (b \sqrt {\frac {d}{x}}\, x +a x +c \right )^{\frac {3}{2}} d x \,b^{2}+12 \left (b \sqrt {\frac {d}{x}}\, x +a x +c \right )^{\frac {3}{2}} \sqrt {\frac {d}{x}}\, x b c -16 \left (b \sqrt {\frac {d}{x}}\, x +a x +c \right )^{\frac {3}{2}} c^{2}\right )}{24 x \sqrt {b \sqrt {\frac {d}{x}}\, x +a x +c}\, c^{3}}\) | \(331\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a + b \sqrt {\frac {d}{x}} + \frac {c}{x}}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+\frac {c}{x}+b\,\sqrt {\frac {d}{x}}}}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________